# coding=utf-8
import mysql.connector
from dbtool import  MysqlMgr


config={'host':'192.168.1.36',#默认127.0.0.1
        'user':'root',
        'password':'jsecode123',
        'port':3306 ,#默认即为3306
        'database':'rescue_platform_data',
        'charset':'utf8'#默认即为utf8
        }

cnn = MysqlMgr.Database(**config)
sqlQuery = 'select * from device_info'
result = cnn.fetch_all(sqlQuery, None)
print result

cnn.close()